package com.jch.mp.manner1.domain.protocol;

import com.jch.mp.manner1.domain.message.ComplexMessage;
import com.jch.mp.manner1.domain.message.GroupMessage;
import com.jch.mp.manner1.domain.message.SimpleMessage;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class PacketClassMap {

    public static final Map<Byte, Class<? extends Packet>> packetTypeMap = new ConcurrentHashMap<>();

    static {
        packetTypeMap.put(Command.SIMPLE_MESSAGE, SimpleMessage.class);
        packetTypeMap.put(Command.GROUP_MESSAGE, GroupMessage.class);
        packetTypeMap.put(Command.COMPLEX_MESSAGE, ComplexMessage.class);
    }
}
